package com.heima.wemedia.controller;

import com.heima.model.dtos.ResponseResult;
import com.heima.wemedia.service.WmChannelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 张一恒
 * @version 1.0
 * @description: 自媒体频道接口
 * @date 2023/1/11 22:43
 */
@RequestMapping("/api/v1/channel")
@RestController
@Slf4j
public class WmChannelController {

    @Autowired
    private WmChannelService wmChannelService;

    /**
     * @description 查询所有频道name
     *
     * @return com.heima.model.dtos.ResponseResult
     * @author 31115
     * @date 2023/1/11 22:47
     */
    @GetMapping("/channels")
    public ResponseResult channels(){
       return wmChannelService.channels();
    }

}
